﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using UBCon.Controls;
using UBCon.Core.Enums;
using UBCon.Navigation;
using UBCon.Ribbon;
using UBCon.Ribbon.Models;
using UBCon.Ribbon.SkinManagers;
using UBCon.RibbonDemo.Models;
using UBCon.RibbonDemo.ViewModels;

namespace UBCon.RibbonDemo.Views
{
    /// <summary>
    /// Interaction logic for ShellView.xaml
    /// </summary>
    public partial class ShellView : UBCon.Ribbon.RibbonWindow
    {
        public ShellView()
        {
            InitializeComponent();
           // this.DataContext = new ShellViewModel();
           Loaded += ShellView_Loaded;
        }

        private void ShellView_Loaded(object sender, RoutedEventArgs e)
        {
            
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Theme = Theme == WindowTheme.Default ? WindowTheme.Classic : WindowTheme.Default;
        }

        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            Application.Current.Resources.MergedDictionaries.Clear();
        }

        private void RadioButton_Checked(object sender, RoutedEventArgs e)
        {
            RibbonRadioButton rb = sender as RibbonRadioButton;
            Skin skin = GetSkin(rb.Title as string);
            SkinManager.ChangeAppSkin(skin);
        }

        private Skin GetSkin(string name) 
        {
            Skin skin = Skin.OfficeBlue;
            switch (name) 
            {
                case "OfficeGreenSkin":
                    skin = Skin.OfficeGreen;
                    break;

                case "OfficeRedSkin":
                    skin = Skin.OfficeRed;
                    break;
                case "OfficeDarkRedSkin":
                    skin = Skin.OfficeDarkRed;
                    break;
                case "OfficeVioletSkin":
                    skin = Skin.OfficeViolet;
                    break;
                case "Office2010Skin":
                    skin = Skin.Office2010;
                    break;
                case "Office2007Skin":
                    skin = Skin.Office2007;
                    break;

                case "DarkSkin":
                    skin = Skin.Dark;
                    break;
            }

            return skin;
        }
      
    }
}
